;;;
;;;
;;;	Author:	Henry C. Francis
;;;		425 N. Ashe St.
;;;		Southern Pines, NC 28387
;;;		http://paracadd.com
;;;		All rights reserved.
;;;
;;;		COPYRIGHT: 
;;;		   EDITED: 
;;;
;;;Requires: mklayr.lsp, stdltypes.lsp, 
;;;
(DEFUN make_layer_ent (assoc8_list /)
  (IF (AND c:mklayr set_layer_ltype_name)
    NIL
    (LOAD "mklayr" "\nFile MKLAYR.LSP not loaded! ")
  ) ;_ end of IF
  (FOREACH n assoc8_list
    (set_layer_ltype_name (CDR n))
    (SETQ acad_ltype_list
      (LIST "dashdot" "border" "center" "dashed" "dashed2" "continuous" "phantom" "hidden" "hidden2" "center2" "dot" "phantom" "phantom2" "divide")
    )
    (SETQ custom_ltype_list
      (LIST "match" "streamd" "streamd2" "dot1d" "dot3d")
    )
    (IF layer_ltype
      (PROGN
        (IF stdltype NIL (LOAD "stdltypes" "\nFile STDLTYPES.LSP not loaded! "))
        (stdltype layer_ltype)
      )
    )
    (IF (>= (STRLEN (CDR n)) 7)
      (PROGN
        (IF debug_make_layer
          (PROGN
            (PRINC "\nn=")
            (PRINC n)
            (PRINC)
          )
        )
             (SETQ layercolor
                    (COND ((WCMATCH (STRCASE (CDR n)) "BREAKLINE*") "1")
                          ((WCMATCH (SUBSTR (CDR n) 7 1) "#") (SUBSTR (CDR n) 7 1))
                          ((WCMATCH (SUBSTR (CDR n) 7 1) "@")
                           (COND ((EQ (STRCASE (SUBSTR (CDR n) 7 1)) "A") "10")
                                 ((EQ (STRCASE (SUBSTR (CDR n) 7 1)) "B") "11")
                                 ((EQ (STRCASE (SUBSTR (CDR n) 7 1)) "C") "12")
                                 ((EQ (STRCASE (SUBSTR (CDR n) 7 1)) "D") "13")
                                 ((EQ (STRCASE (SUBSTR (CDR n) 7 1)) "E") "14")
                                 ((EQ (STRCASE (SUBSTR (CDR n) 7 1)) "F") "15")
                                 ((EQ (STRCASE (SUBSTR (CDR n) 7 1)) "G") "16")
                                 ((EQ (STRCASE (SUBSTR (CDR n) 7 1)) "H") "17")
                                 ((EQ (STRCASE (SUBSTR (CDR n) 7 1)) "I") "18")
                                 ((EQ (STRCASE (SUBSTR (CDR n) 7 1)) "J") "19")
                                 ((EQ (STRCASE (SUBSTR (CDR n) 7 1)) "K") "20")
                                 ((EQ (STRCASE (SUBSTR (CDR n) 7 1)) "L") "21")
                                 ((EQ (STRCASE (SUBSTR (CDR n) 7 1)) "M") "22")
                                 ((EQ (STRCASE (SUBSTR (CDR n) 7 1)) "N") "23")
                                 ((EQ (STRCASE (SUBSTR (CDR n) 7 1)) "O") "24")
                                 ((EQ (STRCASE (SUBSTR (CDR n) 7 1)) "P") "25")
                                 ((EQ (STRCASE (SUBSTR (CDR n) 7 1)) "Q") "26")
                                 ((EQ (STRCASE (SUBSTR (CDR n) 7 1)) "R") "27")
                                 ((EQ (STRCASE (SUBSTR (CDR n) 7 1)) "S") "28")
                                 ((EQ (STRCASE (SUBSTR (CDR n) 7 1)) "T") "29")
                                 ((EQ (STRCASE (SUBSTR (CDR n) 7 1)) "U") "250")
                                 ((EQ (STRCASE (SUBSTR (CDR n) 7 1)) "V") "251")
                                 ((EQ (STRCASE (SUBSTR (CDR n) 7 10)) "WGRID-HORZ") (IF grid_color_minor_h grid_color_minor_h "169"));6
                                 ((EQ (STRCASE (SUBSTR (CDR n) 7 10)) "WGRID-VERT") (IF grid_color_minor_h grid_color_minor_v "169"));6
                                 ((EQ (STRCASE (SUBSTR (CDR n) 7 5)) "WGRID") (IF grid_color_minor_h grid_color_minor_v "169"));6
                                 ((EQ (STRCASE (SUBSTR (CDR n) 7 1)) "W") "252")
                                 ((EQ (STRCASE (SUBSTR (CDR n) 7 10)) "XGRID-HORZ") (IF grid_color_inter_h grid_color_inter_h "109"));4
                                 ((EQ (STRCASE (SUBSTR (CDR n) 7 10)) "XGRID-VERT") (IF grid_color_inter_h grid_color_inter_v "109"));4
                                 ((EQ (STRCASE (SUBSTR (CDR n) 7 5)) "XGRID") (IF grid_color_inter_h grid_color_inter_v "109"));4
                                 ((EQ (STRCASE (SUBSTR (CDR n) 7 1)) "X") "253")
                                 ((EQ (STRCASE (SUBSTR (CDR n) 7 10)) "YGRID-HORZ") (IF grid_color_major_h grid_color_major_h "56"));2
                                 ((EQ (STRCASE (SUBSTR (CDR n) 7 10)) "YGRID-VERT") (IF grid_color_major_h grid_color_major_v "56"));2
                                 ((EQ (STRCASE (SUBSTR (CDR n) 7 5)) "YGRID") (IF grid_color_major_h grid_color_major_h "56"));2
                                 ((EQ (STRCASE (SUBSTR (CDR n) 7 1)) "Y") "254")
                                 ((EQ (STRCASE (SUBSTR (CDR n) 7 1)) "Z") "255")
                           ) ;_ end of COND
                          )
                          (T "1")
                    ) ;_ end of COND
             ) ;_ end of SETQ
      ) ;_ end of PROGN
      (SETQ layercolor "1")
    ) ;_ end of IF
    (IF layentmake
      NIL
      (LOAD "mklayr" "\nFile MKLAYR.LSP not loaded! ")
    ) ;_ end of IF
    (IF (WCMATCH (CDR n) "*|*")
      (WHILE (WCMATCH (CDR n) "*|*")
        (SETQ n (CONS 8 (SUBSTR (CDR n) 2)))
        (PRINC "\n")\
        (PRINC (CDR n))
        (PRINC)
      )
    )
    (layentmake (CDR n) layercolor layer_ltype)
    (IF (TBLOBJNAME "LAYER" (CDR n))
      (SETVAR "CLAYER" (CDR n))
    ) ;_ end of IF
  ) ;_ end of FOREACH
) ;_ end of DEFUN
